package com.wnxy.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wnxy.entity.Book;
import com.wnxy.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 林夕
 * @since 2023-03-18 11:05:47
 */
@RestController
@RequestMapping("/book")
public class BookController {
    @Autowired
    BookService bookService;
    @RequestMapping("/pageBook")
    public Page<Book> pageBook(Integer current, Integer pageSize){
        Page<Book> bookPage = bookService.allBook(current,pageSize);
        return bookPage;
    }
}

